/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package data;
import java.sql.Connection;
import java.sql.Statement;
/**
 *
 * @author NS
 */
public class Profile_Modify {
    private Connection conn;
    public Profile_Modify(Connection conn){
        this.conn = conn;
    }
    public String modify(String name,String spu, String ct, String it){
        Statement stmt;
        try{
            stmt = conn.createStatement();
            System.out.println("ALTER PROFILE " + name +
                               " LIMIT SESSIONS_PER_USER " + spu +
                               " CONNECT_TIME " + ct + 
                               " IDLE_TIME " + it);
            stmt.executeUpdate("ALTER PROFILE " + name +
                               " LIMIT SESSIONS_PER_USER " + spu +
                               " CONNECT_TIME " + ct + 
                               " IDLE_TIME " + it);
            return "success";
        }catch(Exception e){
            return e.getMessage();
        }
    }
    
}
